.output,
.media,
.stdout,
.stderr,
.return,
.marimo-error {
  width: 100%;
}

/* No margin in edit mode, where we already have separation
 * between cells. */
.Cell.published .output-area .output {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.marimo-error a {
  @apply text-link;
}

.output {
  position: relative;
}

.output > * {
  max-width: 100%;
}

.stdout,
.stderr,
.marimo-error {
  font-family: var(--monospace-font);
}

.stdout,
.stderr {
  font-size: 0.813rem;
}

.marimo-error,
.stderr {
  font-weight: bold;

  @apply text-error;
}

.marimo-error {
  background: #ffc0cb30;
  padding: 3%;
  font-size: 0.8125rem;
  border-radius: 20px;
  white-space: pre-wrap; /* respect newlines */
}

.marimo-json-output {
  padding-top: 2px;
  padding-bottom: 2px;

  /* content-visibility is set by material UI;
   * when set on an element that has overflow auto, causes abrupt jumps when
   * scrolling in Chrome */
  content-visibility: unset;

  /* Coarse hack to stop children from overflowing; doesn't seem to affect
   * margin collapse. */
  overflow: auto;

  @apply text-xs;
}

.marimo-json-output .data-key-pair:not(:last-child) {
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
}

.traceback-cell-link {
  color: inherit;
}
